﻿// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using DotNetFramework.CAP.Core.Ioc;
using DotNetFramework.CAP.InMemoryStorage;
using System;
//using DotNetFramework.CAP.Persistence;
//using Microsoft.Extensions.DependencyInjection;

// ReSharper disable once CheckNamespace
namespace DotNetFramework.CAP
{
    internal class InMemoryCapOptionsExtension : ICapOptionsExtension
    {
        public void AddServices(IServiceCollection services,Action<IServiceCollection> discorvery)
        {
            services.AddSingleton<CapStorageMarkerService>();

            services.AddTransient<ICapTransaction, InMemoryCapTransaction>();
            services.AddSingleton<IStorage, InMemoryStorageInitializer>();
            services.AddSingleton<IStorageConnection, DotNetFramework.CAP.InMemoryStorage.InMemoryStorage>();
            //services.AddSingleton<IStorageInitializer, InMemoryStorageInitializer>();
        }
    }
}